package datastructure.sort;

import java.util.Arrays;

/**
 * @author yinlei
 * @date 2018/7/2
 * @since 1.0.0
 */
public class SortUtil {

    public static int[] random(int size) {
        int[] a = new int[size];
        for (int i = 0; i < size; i++) {
            a[i] = (int) (Math.random() * size * 10);
        }
        return a;
    }

    public static int[] getRandom() {
        return random(10);
    }

    public static  int[] get() {
        return new int[]{68, 56, 46, 58, 54, 89, 46, 22, 4, 74};
    }

    public static void swap(int[] arr, int i, int j) {
        int temp = arr[i];
        arr[i] = arr[j];
        arr[j] = temp;
    }

    public static void display(int[] arr) {
        System.out.println(Arrays.toString(arr));
    }
}
